//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UserHasJobs, UserHasJobsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUserHasJobsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UserHasJobsResponse>(`/uctoo/user_has_jobs/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUserHasJobs = async (id: string) => {
  return requestClient.get<UserHasJobs>(`/uctoo/user_has_jobs/${id}`);
};

export const adductooUserHasJobs = async (data: Partial<UserHasJobs>) => {
  return requestClient.post<UserHasJobs>('/uctoo/user_has_jobs/add', data);
};

export const edituctooUserHasJobs = async (data: Partial<UserHasJobs>) => {
  return requestClient.post<UserHasJobs>('/uctoo/user_has_jobs/edit', data);
};

export const deleteuctooUserHasJobs = async (id: string) => {
  return requestClient.post<any>('/uctoo/user_has_jobs/del', { id });
};
